package com.micai.springboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Spring Boot 应用启动类
 *
 * Created by 赵新国 on 16/4/26.
 */
@SpringBootApplication
@MapperScan("com.micai.springboot.mapper") // 扫描的是mapper.xml中namespace指向值的包位置
@EnableTransactionManagement // 如果mybatis中service实现类中加入事务注解，需要此处添加该注解
public class Application {

    public static void main(String[] args) {
        // 程序启动入口
        // 启动嵌入式的 Tomcat 并初始化 Spring 环境及其各 Spring 组件
        SpringApplication.run(Application.class,args);
    }

}
